package com.binance.mbxgateway.api;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.binance.master.configs.FeignConfig;
import com.binance.master.constant.Constant;
import com.binance.master.models.APIRequest;
import com.binance.master.models.APIResponse;
import com.binance.mbxgateway.vo.ApiKeyInfoVo;
import com.binance.mbxgateway.vo.request.ActivateAccountRequest;
import com.binance.mbxgateway.vo.request.DeleteRuleByRuleIdRequest;
import com.binance.mbxgateway.vo.request.GetAccountRequest;
import com.binance.mbxgateway.vo.request.GetApiCheckRequest;
import com.binance.mbxgateway.vo.request.GetApiInfoRequest;
import com.binance.mbxgateway.vo.request.GetBlanceLedgerRequest;
import com.binance.mbxgateway.vo.request.LockApiTradeRequest;
import com.binance.mbxgateway.vo.request.SaveApiRuleRequest;
import com.binance.mbxgateway.vo.request.SetAgentFeeRequest;
import com.binance.mbxgateway.vo.request.SetGasRequest;
import com.binance.mbxgateway.vo.request.SetTradeRequest;
import com.binance.mbxgateway.vo.request.UnLockApiTradeRequest;
import com.binance.mbxgateway.vo.response.BlanceLedgerResponse;
import com.binance.mbxgateway.vo.response.TradingAccountResponse;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @author wangxiao
 */
@Api
@FeignClient(name = Constant.MBX_GATEWAY_SERVICE, configuration = FeignConfig.class)
public interface IAccountApi {

    @ApiOperation("查询撮合出入金")
    @PostMapping("/mgmt/account/getBlanceLedger")
    public APIResponse<List<BlanceLedgerResponse>> getBlanceLedger(
            @RequestBody APIRequest<GetBlanceLedgerRequest> request) throws Exception;

    @ApiOperation("解锁API交易")
    @PostMapping("/mgmt/account/unlockApiTrade")
    public APIResponse<Void> unlockApiTrade(@RequestBody APIRequest<UnLockApiTradeRequest> request) throws Exception;

    @ApiOperation("锁定API交易")
    @PostMapping("/mgmt/account/lockApiTrade")
    public APIResponse<Void> lockApiTrade(@RequestBody APIRequest<LockApiTradeRequest> request) throws Exception;


    @ApiOperation("获取API签名验证")
    @PostMapping("/mgmt/getApiCheck")
    public APIResponse<ApiKeyInfoVo> getApiCheck(@RequestBody APIRequest<GetApiCheckRequest> request) throws Exception;

    @ApiOperation("设置是否可以交易")
    @PostMapping("/mgmt/account/setTrade")
    public APIResponse<Void> setTrade(@RequestBody APIRequest<SetTradeRequest> request) throws Exception;


    @ApiOperation("设置手续费GAS")
    @PostMapping("/mgmt/setGas")
    public APIResponse<Void> setGas(@RequestBody APIRequest<SetGasRequest> request) throws Exception;

    @ApiOperation("")
    @PostMapping("/private/account")
    public APIResponse<TradingAccountResponse> getAccount(@RequestBody APIRequest<GetAccountRequest> request)
            throws Exception;

    @ApiOperation("")
    @PostMapping("/mgmt/account/activate")
    public APIResponse<Void> activateAccount(@RequestBody APIRequest<ActivateAccountRequest> request) throws Exception;


    @ApiOperation("设置返佣比例")
    @PostMapping("/mgmt/user/agentFee")
    public APIResponse<Void> setAgentFee(@RequestBody APIRequest<SetAgentFeeRequest> request) throws Exception;

    @ApiOperation("")
    @PostMapping("/mgmt/account/saveApiRule")
    public APIResponse<Void> saveApiRule(@RequestBody APIRequest<SaveApiRuleRequest> request) throws Exception;

    @ApiOperation("")
    @PostMapping("/mgmt/account/deleteRuleByRuleId")
    public APIResponse<Void> deleteRuleByRuleId(@RequestBody APIRequest<DeleteRuleByRuleIdRequest> request)
            throws Exception;

    @ApiOperation("")
    @PostMapping("/mgmt/account/getApiInfo")
    public APIResponse<List<ApiKeyInfoVo>> getApiInfo(@RequestBody APIRequest<GetApiInfoRequest> request)
            throws Exception;

}
